<?php
require_once dirname(__FILE__).'/../bootstrap/unit.php';
 
$t = new lime_test(7);
$t->is(SmartManager::slugify('smartmanager'), 'smartmanager', '::slugify() converts all characters to lower case');
$t->is(SmartManager::slugify('smart manager'), 'smart-manager', '::slugify() replaces a white space by a -');
$t->is(SmartManager::slugify('smart   manager'), 'smart-manager', '::slugify() replaces several white spaces by a single -');
$t->is(SmartManager::slugify('smart, manager'), 'smart-manager', '::slugify() replaces non-ASCII characters by a -');
$t->is(SmartManager::slugify('  smartmanager'), 'smartmanager', '::slugify() removes - at the beginning of a string');
$t->is(SmartManager::slugify('smartmanager  '), 'smartmanager', '::slugify() removes - at the end of a string');
if (function_exists('iconv'))
{
  $t->is(SmartManager::slugify('Développeur Web'), 'developpeur-web', '::slugify() removes accents');
}
else
{
  $t->skip('::slugify() removes accents - iconv not installed');
}
?>